package com.lefevre.cms.bean.staff;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 系统用户角色中间表
 *
 * @author Lefevre
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_users_roles")
@Entity()
@Table(name = "sys_users_roles")
public class SysUsersRoles implements Serializable {
    private static final long serialVersionUID = 3748392796372099307L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @TableId(type = IdType.INPUT)
    private Long id;

    @Column(length = 30)
    private String userAccount;

    private String roleId;

    public SysUsersRoles(String userAccount, String roleId) {
        this.userAccount = userAccount;
        this.roleId = roleId;
    }

}
